<!--datagrid列表-->
<table id="<{:html_id('datagrid')}>" data-menu="#<{:html_id('datagrid-menu')}>" data-toolbar="#<{:html_id('datagrid-toolbar')}>" data-title="<{$title}>" data-url="<{:U(CONTROLLER_NAME . '/' . ACTION_NAME, array('grid'=>'datagrid'))}>">
	<thead>
		<tr>
			<th data-options="field:'roleid',width:100,sortable:true">ID</th>
			<th data-options="field:'rolename',width:200,sortable:true">角色名称</th>
			<th data-options="field:'description',width:350,sortable:true">角色描述</th>
			<th data-options="field:'listorder',width:100,sortable:true">排序</th>
			<th data-options="field:'status',width:100,sortable:true">状态</th>
		</tr>
	</thead>
</table>

<!--工具栏-->
<div id="<{:html_id('datagrid-toolbar')}>">
	<!--搜索-->
	<a class="easyui-linkbutton toolbar-search" data-data="[
		{name:'角色ID',field:'roleid', editor:'numberbox',group:'其他'},
		{name:'角色名称',field:'rolename', editor:'text',group:'其他'},
		{name:'状态',field:'status', editor:{type:'combobox',options:{editable:false,panelHeight:'auto',data:[{value:1,text:'启用'},{value:0,text:'禁用'}]}},group:'其他'}
	]" data-close="true" data-group="false" data-width="400" data-height="200" iconCls="fa fa-search" plain="true">搜索</a>

	<!--操作项-->
	<foreach name="toolbars" item="li">
		<a class="easyui-linkbutton toolbar-action" data-action="<{$li.a}>" iconCls="<{$li.icon}>" plain="true" data-href="<{:U($li['c'] . '/' . $li['a'] . '?' . $li['data'])}>"><{$li.name}></a>
	</foreach>
</div>

<!--右键菜单-->
<if condition="count($toolbars) gt 0">
	<div id="<{:html_id('datagrid-menu')}>" class="easyui-menu">
		<foreach name="toolbars" item="li">
			<div class="menu-action" data-action="<{$li.a}>" data-href="<{:U($li['c'] . '/' . $li['a'] . '?' . $li['data'])}>" iconCls="<{$li.icon}>"><{$li.name}></div>
		</foreach>
	</div>
</if>

<script type="text/javascript">
	require(['user/role'], function(module){
		module.init("#<{:html_id('datagrid')}>");
	});
</script>